package com.situ.science.controller;

import com.situ.science.pojo.Contest;
import com.situ.science.pojo.Logs;
import com.situ.science.pojo.query.ContestQuery;
import com.situ.science.pojo.query.LogsQuery;
import com.situ.science.service.ILogService;
import com.situ.science.utils.PageRusults;
import com.situ.science.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/log")
public class LogController {
    @Autowired
    private ILogService logService;

   /* @RequestMapping ("/list")
    public Result list() {//getContests
        List<Logs> logsList = logService.list();
        return Result.ok(logsList);
    }*/

    @RequestMapping("/list")
    public PageRusults list(LogsQuery logsQuery) {
        PageRusults pageRusults = logService.selectByPage(logsQuery);
        return pageRusults;
    }
}
